import myaxios from '../MyAxios'
import BASEURL from '../BaseUrl'
const { BMDURL } = BASEURL

const roomApi = {
  // http://127.0.0.1:3000/fy/
  // 房源列表
  list(params) {
    return myaxios.get(BMDURL + '/fx/list', params)
  },
  //
  query(params) {
    return myaxios.get(BMDURL + '/fy/query', params)
  },
  // 酒店添加
  add(params) {
    return myaxios.post(BMDURL + '/fy/add', params)
  },
  // 通过酒店id查找酒店列表
  QueryByHid(params) {
    return myaxios.get(BMDURL + '/room/info/query', params)
  },
  delete(params) {
    return myaxios.delete(BMDURL + `/fx/${params}`)
  },

  // 模糊查询酒店
  queryByNameLike(params) {
    return myaxios.post(BMDURL + '/fx/name', params)
  },

  // 分页模糊查询
  mohu(params) {
    return myaxios.post(BMDURL + '/fx/mohu', params)
  },
  // 修改酒店房间
  updateroom(params) {
    return myaxios.put(BMDURL + '/room/put', params)
  },
}
export default roomApi
